package com.controller;

import java.io.IOException;
import java.io.PrintWriter;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

@WebServlet("/Fail")
public class Fail extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
			this.doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
			PrintWriter out = resp.getWriter();
			out.println("<html>");
			out.println("<head><title>登录失败的界面</title></head>");
			out.println("<body bgcolor='orange'><h1>登录失败,请重新登录</h1>&nbsp;&nbsp;<a href='login.html'>重新登录</a>");
			out.println("</body></html>");
			out.close();
	}
			
}
